package com.bit.ioc.controller;

import com.bit.ioc.model.DataSourceConfig22;
import com.bit.ioc.model.Dbtypes;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/yml")
public class YmlController {
    @Value("${key}")
    private String key;

    @Value("${spring.datasource.url}")
    private String url;

    @Autowired
    private DataSourceConfig22 config;

    @Autowired
    private Dbtypes dbtypes;

    @RequestMapping("/readValue")
    public String readValue(){
        System.out.println("key:" + key);
        System.out.println("url:" + url);
        System.out.println(config);
        System.out.println(dbtypes);
        return "key:" + key;
    }
}
